import request from '@/utils/request'

// 定义 Digest 数据接口
export interface DigestDetail {
  id: string
  generatedTitle: string
  summaryContent: string
  generatedArticle: string
  keywords: string
  qualityScore: number
  articleCount: string
  fictionLevel: string
  createdBy: string
  createdTime: string
  updatedBy: string
  updatedTime: string
  generationStatus: string
  [key: string]: any
}

// 查询参数接口
export interface DigestQueryParams {
  pageNum?: number
  pageSize?: number
  sortBy?: string
  [key: string]: any
}

// 查询热搜主题AI生成文本列表
export function listDigest(query: DigestQueryParams) {
  return request({
    url: '/digest/digest/list',
    method: 'get',
    params: query
  })
}

// 查询热搜主题AI生成文本详细
export function getDigest(id: string) {
  console.log('getDigest function called with id:', id)
  return request({
    url: '/digest/digest/' + id,
    method: 'get'
  })
} 